import { axios } from '@/utils/request'
//标准视频分页列表
export function getStandardVideoList(info) {
    return axios({
      url: '/api/video/manage/pages',
      method: 'get',
      params:{   
        'current':info.current, 
        'pageSize':info.pageSize,
        'country':info.country,
        'customer':info.customer, 
        'lineIp':info.lineIp,
        'number':info.number,
        'projectName':info.projectName,
        'flag':1,
        'memberId':''
      }
    })
  }
//删除资源入口标准视频
export function deleteVideo(id) {
  return axios({
    url: `/api/dwMeter/manage/video/${id}`,
    method: 'delete',
  })
}
//删除资源入口平安监控
export function deleteMonitor(id) {
  return axios({
    url: `/api/monitor/manage/monitor/${id}`,
    method: 'delete',
  })
}
//标准更新资源
export function modifyVideo(info) {
    return axios({
      url: '/api/video/manage/video',
      method: 'put',
      data:info
    })
  }
//平安监控更新资源
export function modifyMonitorVideo(info) {
  return axios({
    url: 'api/monitor/manage/monitor',
    method: 'put',
    data:info
  })
}
//平安视频分页列表
export function getSafeVideoList(info) {
  return axios({
    url: '/api/monitor/manage/pages',
    method: 'get',
    params:{   
      'current':info.current, 
      'pageSize':info.pageSize,
      'country':info.country,
      'siteNo':info.siteNo, 
      'police':info.police,
      'number':info.number,
      'projectName':info.projectName,
      'flag':1,
      'memberId':''
    }
  })
}
//标准视频列表表
export function getList(current,pageSize,country,customer,flag,lineIp,memberId,number,projectName) {
  return axios({
    url: '/api/video/manage/pages',
    method: 'get',
    params:{   
      'current':current, 
      'pageSize':pageSize,
      'country':country, 
      'customer':customer,
      'flag':flag,  //类型1:成功，2：审核中，3：未发起审核
      'lineIp':lineIp,
      'memberId':memberId, 
      'number':number,
      'projectName':projectName, 
    }
  })
}
//标准数据详情
export function getVideoById(id) {
  return axios({
    url: `/api/video/manage/video/${id}`,
    method: 'get',
  })
}
//标准视频数据更新
export function modifyManageVideo(info) {
  return axios({
    url: '/api/video/manage/video',
    method: 'put',
    data:info
  })
}

//标准视频删除
export function deleteManageVideo(id) {
  return axios({
    url: `/api/video/manage/video/${id}`,
    method: 'delete',
  })
}


//添加标准视频
export function addVideo(memberDTO) {
  return axios({
    url: '/api/video/manage/video',
    method: 'post',
    data:memberDTO
  })
}
//平安监控导入列表
export function getMonitorList(current,pageSize,country,flag,memberId,number,police,projectName,siteNo) {
  return axios({
    url: '/api/monitor/manage/pages',
    method: 'get',
    params:{   
      'current':current, 
      'pageSize':pageSize,
      'country':country,
      'flag':flag,
      'memberId':memberId,
      'number':number,
      'police':police,
      'projectName':projectName,
      'siteNo':siteNo
    }
  })
}
//添加平安监控
export function addMonitor(memberDTO) {
  return axios({
    url: '/api/monitor/manage/monitor',
    method: 'post',
    data:memberDTO
  })
}

//平安数据详情
export function getMonitorById(id) {
  return axios({
    url: `/api/monitor/manage/monitor/${id}`,
    method: 'get',
  })
}
//平安数据更新
export function modifyMonitor(info) {
  return axios({
    url: '/api/monitor/manage/monitor',
    method: 'put',
    data:info
  })
}
//平安提交审核
export function modifyStatus(id,status,pass,remark) {
  return axios({
    url: `/api/monitor/manage/monitor`,
    method: 'get',
    params:{   
      'id':id,
      'pass':pass, 
      'status':status,
      'remark':remark,
    }
  })
}
//标准提交审核
export function modifyVideoStatus(id,status,pass,remark) {
  return axios({
    url: `/api/video/manage/video`,
    method: 'get',
    params:{   
      'id':id,
      'pass':pass, 
      'status':status,
      'remark':remark,
    }
  })
}
//标准视频提交附件
export function setStandardVideoAnnex(annex,id) {
  return axios({
    url: '/api/video/manage/annex',
    method: 'put',
    params:{   
      'annex':annex,
      'id':id, 
    }
  })
}

//平安提交附件
export function setSafeAnnex(annex,id) {
  return axios({
    url: '/api/monitor/manage/annex',
    method: 'put',
    params:{   
      'annex':annex,
      'id':id, 
    }
  })
}
//站点统计
export function getSafeVideoTotal(info) {
  return axios({
    url: '/api/video/manage/total',
    method: 'get',
    params:{   
      'country':info.country,
      'type':info.type, 
      'startTime':info.startTime,
      'endTime':info.endTime,
      'projectName':info.projectName
    }
  })
}

//费用管理
export function getManagePagesTotal(info) {
  return axios({
    url: '/api/cost/manage/pages',
    method: 'get',
    params:{ 
      'current':info.current,
      'pageSize':info.pageSize, 
      'contractName':info.contractName,
      'contractNo':info.contractNo, 
      'startTime':info.startTime,
      'endTime':info.endTime,
    }
  })
}

//添加费用
export function addCost(memberDTO) {
  return axios({
    url: '/api/cost/manage/cost',
    method: 'post',
    data:memberDTO
  })
}

//管理费用 上传附件
export function uploadingCostAnnex(annex,id) {
  return axios({
    url: '/api/cost/manage/annex',
    method: 'put',
    params:{ 
      'annex':annex,
      'id':id, 
    }
  })
}

//编辑费用
export function modifyCost(memberDTO) {
  return axios({
    url: '/api/cost/manage/inspection',
    method: 'put',
    data:memberDTO
  })
}

//删除费用
export function deleteCost(id) {
  return axios({
    url: `/api/cost/manage/inspection/${id}`,
    method: 'delete',
  })
}


//巡检反馈分页
export function getInspectionPagesTotal(info) {
  return axios({
    url: '/api/inspection/manage/pages',
    method: 'get',
    params:{ 
      'current':info.current,
      'pageSize':info.pageSize, 
      'country':info.country,
      'pointName':info.pointName, 
      'startTime':info.startTime,
      'endTime':info.endTime,
    }
  })
}

//添加巡检计划
export function addInspection(info) {
  return axios({
    url: '/api/inspection/manage/inspection',
    method: 'post',
    data:info
  })
}

//编辑巡检
export function modifyInspection(memberDTO) {
  return axios({
    url: '/api/inspection/manage/inspection',
    method: 'put',
    data:memberDTO
  })
}

//删除巡检
export function deleteInspection(id) {
  return axios({
    url: `/api/inspection/manage/inspection/${id}`,
    method: 'delete',
  })
}


//巡检统计分页
export function getInspectionTotal(info) {
  return axios({
    url: '/api/inspection/manage/total',
    method: 'get',
    params:{ 
      // 'current':info.current,
      // 'pageSize':info.pageSize, 
      'country':info.country, 
      'startTime':info.startTime,
      'endTime':info.endTime,
    }
  })
}


//合同分页
export function getDwContractList(info) {
  return axios({
    url: '/api/dwContract/manage/pages',
    method: 'get',
    params:{ 
      'current':info.current,
      'pageSize':info.pageSize, 
      'type':info.type, 
      'companyName':info.companyName,
      'contractName':info.contractName,
      'contractNo':info.contractNo,
    }
  })
}

//添加合同
export function adddwContract(memberDTO) {
  return axios({
    url: '/api/dwContract/manage/dwContract',
    method: 'post',
    data:memberDTO
  })
}

//编辑合同
export function modifydwContract(memberDTO) {
  return axios({
    url: '/api/dwContract/manage/dwContract',
    method: 'put',
    data:memberDTO
  })
}

//删除合同
export function deletedwContract(id) {
  return axios({
    url: `/api/dwContract/manage/dwContract/${id}`,
    method: 'delete',
  })
}

//合同名字模糊查询
export function getContractNameSelect(contractName,contractNo) {
  return axios({
    url: '/api/dwContract/manage/dwContracts',
    method: 'get',
    params:{ 
      'contractName':contractName,
      'contractNo':contractNo, 
    }
  })
}



//车辆分页
export function getDwCarList(info) {
  return axios({
    url: '/api/dwCar/manage/pages',
    method: 'get',
    params:{ 
      'current':info.current,
      'pageSize':info.pageSize, 
    }
  })
}

//车辆添加分页
export function getDwCarAddList(info) {
  return axios({
    url: '/api/dwCar/manage/pages_add',
    method: 'get',
    params:{ 
      'current':info.current,
      'pageSize':info.pageSize, 
    }
  })
}

//添加车辆
export function adddwCar(memberDTO) {
  return axios({
    url: '/api/dwCar/manage/dwCar',
    method: 'post',
    data:memberDTO
  })
}

//编辑车辆
export function modifydwCar(memberDTO) {
  return axios({
    url: '/api/dwCar/manage/DwCar',
    method: 'put',
    data:memberDTO
  })
}

//删除车辆
export function deletedwCar(id) {
  return axios({
    url: `/api/dwCar/manage/DwCar/${id}`,
    method: 'delete',
  })
}

//车辆详情
export function getdwCarById(id) {
  return axios({
    url: `/api/dwCar/manage/dwCar/${id}`,
    method: 'get',
  })
}





//代维设置
export function adddwSetting(memberDTO) {
  return axios({
    url: '/api/dwSetting/manage/dwSetting',
    method: 'post',
    data:memberDTO
  })
}

//代维设置分页
export function dwSettingList(info) {
  return axios({
    url: '/api/dwSetting/manage/pages',
    method: 'get',
    params:{ 
      'current':info.current,
      'pageSize':info.pageSize,
      'type':info.type, 
    }
  })
}


//代维设置删除
export function deleteDwsetById(id) {
  return axios({
    url: `/api/dwSetting/manage/dwSetting/${id}`,
    method: 'delete',
  })
}

//仪器分页
export function getDwMeterList(info) {
  return axios({
    url: '/api/dwMeter/manage/pages',
    method: 'get',
    params:{ 
      'current':info.current,
      'pageSize':info.pageSize, 
    }
  })
}

//添加仪器
export function adddwMeter(memberDTO) {
  return axios({
    url: '/api/dwMeter/manage/dwMeter',
    method: 'post',
    data:memberDTO
  })
}

//编辑仪表
export function modifydwMeter(memberDTO) {
  return axios({
    url: '/api/dwMeter/manage/dwEquip',
    method: 'put',
    data:memberDTO
  })
}

//删除仪表
export function deletedwMeter(id) {
  return axios({
    url: `/api/dwMeter/manage/dwEquip/${id}`,
    method: 'delete',
  })
}


//备件分页
export function getDwEquipList(info) {
  return axios({
    url: '/api/dwEquip/manage/pages',
    method: 'get',
    params:{ 
      'current':info.current,
      'pageSize':info.pageSize, 
    }
  })
}

//添加备件
export function adddwEquip(memberDTO) {
  return axios({
    url: '/api/dwEquip/manage/dwEquip',
    method: 'post',
    data:memberDTO
  })
}


//编辑备件
export function modifydwEquip(memberDTO) {
  return axios({
    url: '/api/dwEquip/manage/dwEquip',
    method: 'put',
    data:memberDTO
  })
}

//删除备件
export function deletedwEquip(id) {
  return axios({
    url: `/api/dwEquip/manage/dwEquip/${id}`,
    method: 'delete',
  })
}

//编辑人员
export function modifydwStaff(memberDTO) {
  return axios({
    url: '/api/dwStaff/manage/dwEquip',
    method: 'put',
    data:memberDTO
  })
}

//删除人员
export function deletedwStaff(id) {
  return axios({
    url: `/api/dwStaff/manage/dwEquip/${id}`,
    method: 'delete',
  })
}



//代维人员分页
export function getStaffList(info) {
  return axios({
    url: '/api/dwStaff/manage/dwStaffs',
    method: 'get',
    params:{ 
      'current':info.current,
      'pageSize':info.pageSize, 
    }
  })
}

//代维人员添加
export function adddwStaff(memberDTO) {
  return axios({
    url: '/api/dwStaff/manage/dwCar',
    method: 'post',
    data:memberDTO
  })
}
//人员统计分页
export function getStaffCountList(info) {
  return axios({
    url: '/api/dwStaff/manage/pages',
    method: 'get',
    params:{ 
      'current':info.current,
      'pageSize':info.pageSize, 
    }
  })
}



//视频导出
export function exportExcelVideo(info) {
  return axios({
    url: '/api/export/manage/video',
    method: 'post',
    responseType:'blob',
    params:{            
      'startTime':info.startTime,
      'endTime':info.endTime,
      'projectName':info.projectName,
      'country':info.country,
    }
  })
}

//平安监控导出
export function exportExcelMonitor(info) {
  return axios({
    url: '/api/export/manage/monitor',
    method: 'post',
    responseType:'blob',
    params:{            
      'startTime':info.startTime,
      'endTime':info.endTime,
      'projectName':info.projectName,
      'country':info.country,
    }
  })
}

//巡检计划 上传附件
export function uploadingAnnex(annex,id) {
  return axios({
    url: '/api/inspection/manage/annex',
    method: 'put',
    params:{ 
      'annex':annex,
      'id':id, 
    }
  })
}
//巡检计划更新时间
export function modifyTime(time,id) {
  return axios({
    url: '/api/inspection/manage/time',
    method: 'put',
    params:{ 
      'time':time,
      'id':id, 
    }
  })
}



//在线标准视频导入列表
export function getlineVideoList(current,pageSize,country,startTime,endTime) {
  return axios({
    url: '/api/lineVideo/manage/pages',
    method: 'get',
    params:{   
      'current':current, 
      'pageSize':pageSize,
      'country':country,
      'startTime':startTime,
      'endTime':endTime,
    }
  })
}

//新增在线视频
export function addLineVideo(info) {
  return axios({
    url: '/api/lineVideo/manage/lineVideo',
    method: 'post',
    data:info
  })
}


//更新在线视频
export function modifyLineVideo(info) {
  return axios({
    url: '/api/lineVideo/manage/lineVideo',
    method: 'put',
    data:info
  })
}

//删除在线视频
export function deleteLineVideo(id) {
  return axios({
    url: `/api/lineVideo/manage/lineVideo/${id}`,
    method: 'delete',
  })
}



//在线平安视频导入列表
export function getLineMonitorList(current,pageSize,country,startTime,endTime) {
  return axios({
    url: '/api/lineMonitor/manage/pages',
    method: 'get',
    params:{   
      'current':current, 
      'pageSize':pageSize,
      'country':country,
      'startTime':startTime,
      'endTime':endTime,
    }
  })
}

//新增在线平安视频
export function addLineMonitor(info) {
  return axios({
    url: '/api/lineMonitor/manage/lineMonitor',
    method: 'post',
    data:info
  })
}


//更新在线平安视频
export function modifyLineMonitor(info) {
  return axios({
    url: '/api/lineMonitor/manage/lineMonitor',
    method: 'put',
    data:info
  })
}

//删除在线平安视频
export function deleteLineMonitor(id) {
  return axios({
    url: `/api/lineMonitor/manage/lineMonitor/${id}`,
    method: 'delete',
  })
}


//在线标准视频导出
export function exportExcelLineVideo(country,startTime,endTime) {
  return axios({
    url: '/api/export/manage/lineVideo_export',
    method: 'post',
    responseType:'blob',
    params:{
      'country':country,           
      'startTime':startTime,
      'endTime':endTime,
     
    }
  })
}

//在线平安视频导出
export function exportExcelLineMonitor(country,startTime,endTime) {
  return axios({
    url: '/api/export/manage/lineMonitor_export',
    method: 'post',
    responseType:'blob',
    params:{            
      'country':country,           
      'startTime':startTime,
      'endTime':endTime,
    }
  })
}